<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/6/5
  Time: 16:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/common/tagPage.jsp" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <!--IE Compatibility modes-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!--Mobile first-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>瀚越太古登录页面</title>

    <meta name="description" content="Free Admin Template Based On Twitter Bootstrap 3.x">
    <meta name="author" content="">

    <meta name="msapplication-TileColor" content="#5bc0de" />
    <meta name="msapplication-TileImage" content="${baseurl}assets/img/bg1.jpg" />
    <link rel="icon" type="image/png" href="${baseurl}assets/i/favicon.png">
    <!-- Bootstrap -->
    <link rel="stylesheet" href="${baseurl}assets/lib/bootstrap/css/bootstrap.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="${baseurl}assets/lib/font-awesome/css/font-awesome.css">
    <!-- Metis core stylesheet -->
    <link rel="stylesheet" href="${baseurl}assets/css/main.css">
    <!-- metisMenu stylesheet -->
    <link rel="stylesheet" href="${baseurl}assets/lib/metismenu/metisMenu.css">
    <!-- onoffcanvas stylesheet -->
    <link rel="stylesheet" href="${baseurl}assets/lib/onoffcanvas/onoffcanvas.css">
    <!-- animate.css stylesheet -->
    <link rel="stylesheet" href="${baseurl}assets/lib/animate.css/animate.css">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
</head>

<body class="login">

<div class="form-signin" style="margin: auto; margin-top:200px;">
    <div class="text-center">
        <img src="${baseurl}statics/assets/images/sunny-large.jpg" width="120" height="90"  alt="TaiGu Logo">
    </div>
    <h3 style="margin-left:60px; ">瀚越太古管理后台</h3>
    <hr>
    <div class="tab-content">
        <div id="login" class="tab-pane active">
            <form action="${baseurl}login.do" method="post">
                <c:if test="${error == null || error == ''}">
                    <!-- <p class="text-muted text-center">
                    请输入您的用户名和密码
                    </p> -->
                </c:if>
                <c:if test="${error != null}">
                    <p class="text-muted text-center">
                            ${error}
                    </p>
                </c:if>
                <input type="text" placeholder="用户名" name="username"  class="form-control top">
                <input type="password" placeholder="密码" name="password" class="form-control bottom">
                <div class="checkbox">
                    <label>
                        <input type="checkbox" name="rememberMe"> 记住密码
                    </label>
                </div>
                <button class="btn btn-lg btn-primary btn-block" type="submit" style="background-color: green;">登录</button>
            </form>
        </div>
        <div id="forgot" class="tab-pane">
            <form action="index.html">
                <p class="text-muted text-center">输入有效的电子邮件</p>
                <input type="email" placeholder="mail@domain.com" class="form-control">
                <br>
                <button class="btn btn-lg btn-danger btn-block" type="submit">重置密码</button>
            </form>
        </div>
        <div id="signup" class="tab-pane">
            <form action="index.html">
                <input type="text" placeholder="username" class="form-control top">
                <input type="email" placeholder="mail@domain.com" class="form-control middle">
                <input type="password" placeholder="password" class="form-control middle">
                <input type="password" placeholder="re-password" class="form-control bottom">
                <button class="btn btn-lg btn-success btn-block" type="submit">注册</button>
            </form>
        </div>
    </div>
    <hr>
    <div class="text-center">
        <ul class="list-inline">
            <li><a class="text-muted" href="#login" data-toggle="tab">登录</a></li>
            <li><a class="text-muted" href="#forgot" data-toggle="tab">忘记密码</a></li>
            <%--<li><a class="text-muted" href="#signup" data-toggle="tab">注册</a></li>--%>
        </ul>
    </div>
</div>


<!--jQuery -->
<script src="${baseurl}assets/lib/jquery/jquery.js"></script>

<!--Bootstrap -->
<script src="${baseurl}assets/lib/bootstrap/js/bootstrap.js"></script>


<script type="text/javascript">

    $(document).ready(function() {
        $("form").submit(function(e){
            e.preventDefault();
            var username = $('#login input[name="username"]').val();
            var password = $('#login input[name="password"]').val();
            if(username !=null && username != ""){
                if(password !=null && password != ""){
                    this.submit();
                }else{
                    alert("密码不能为空！");
                }
            } else {
                alert("用户名不能为空！");
            }


        });
    });
</script>
</body>

</html>
